﻿using System;
using System.IO;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB;

using YArchitech.LIB;
using YArchitech.Revit;

namespace YArchitech.DataModel
{
	public class HYParametersSetting
	{
		public HYParametersSetting(UIApplication uiApp)
		{
			this.path = Path.Combine(Product.DataLocation, "HYShared Parameters.txt");
			this.uiApp = uiApp;
		}

		public bool SetSprinklersRudioShareParam()
		{
			return YJKRevitTools.SetInstanceParameter(this.uiApp, this.path, "喷头布置", "喷淋半径", BuiltInCategory.OST_Sprinklers, true);
		}

		public bool SetSprinklersDangerShareParam()
		{
			return YJKRevitTools.SetInstanceParameter(this.uiApp, this.path, "喷头布置", "危险等级", BuiltInCategory.OST_Sprinklers, true);
		}

		public bool SetSprinklersRowDistanceShareParam()
		{
			return YJKRevitTools.SetInstanceParameter(this.uiApp, this.path, "喷头布置", "行间距", BuiltInCategory.OST_Sprinklers, false);
		}

		public bool SetSprinklersColDistanceShareParam()
		{
			return YJKRevitTools.SetInstanceParameter(this.uiApp, this.path, "喷头布置", "列间距", BuiltInCategory.OST_Sprinklers, false);
		}

		public bool SetHydrantRudioShareParam()
		{
			return YJKRevitTools.SetInstanceParameter(this.uiApp, this.path, "消火栓布置", "保护半径", BuiltInCategory.OST_MechanicalEquipment, true);
		}

		public bool SetFireExtinguisherRudioShareParam()
		{
			return YJKRevitTools.SetInstanceParameter(this.uiApp, this.path, "灭火器布置", "保护半径", BuiltInCategory.OST_FireAlarmDevices, true);
		}

		public bool SetFanShareParam()
		{
			return YJKRevitTools.SetInstanceParameter(this.uiApp, this.path, "机械设备", "统计名称", BuiltInCategory.OST_MechanicalEquipment, true);
		}

		private string path = "";

		private UIApplication uiApp;
	}
}
